<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<form action="json/xfb.json" class="datagrid-edit-form" data-toggle="validate" data-data-type="jsonp">
    <div class="bjui-row col-2">
       
        <label class="row-label">申请单位</label>
        <div class="row-input required">
            <input   type="text" name="obj.company" value="${param.company }" data-rule="required">
        </div>
         <label class="row-label">单位地址</label>
        <div class="row-input required">
            <input   type="text" name="obj.comaddress" value="${param.comaddress }" data-rule="required">
        </div>
         <label class="row-label">备用联系人</label>
        <div class="row-input required">
            <input   type="text" name="obj.customer" value="${param.customer }" data-rule="required">
        </div>
         <label class="row-label">备用联系人电话</label>
        <div class="row-input required">
            <input   type="text" name="obj.cusphone" value="${param.cusphone }" data-rule="required">
        </div>

          <label class="row-label">联系邮箱</label>
        <div class="row-input required">
            <input   type="text" name="obj.cusemail" value="${param.cusemail }" data-rule="required">
        </div>
         <label class="row-label">已分配数量</label>
        <div class="row-input required">
            <input disabled="disabled"  type="text" name="obj.allocationnum" value="0" data-rule="required">
        </div>
        
      <%--  <div class="row-input required">
            <input disabled="disabled" type="text" name="obj.flag" value="${param.addFlag}" data-rule="required"  >
        </div> --%>
      
    </div>
    <div class="bjui-pageFooter">
    <ul>
    	<li>
    		<button type="button" class="btn-close btn" data-icon="close">取消</button>
    	</li>
    	<li>
    		<button type="button" class="btn-default btn" data-icon="save" onclick="adopt_request()">提交</button>
    	</li>
    	
    </ul>
    </div>
</form>
<script>
	function adopt_request(){
		var company = $("[name='obj.company']").val();
		var comaddress = $("[name='obj.comaddress']").val();
		var customer = $("[name='obj.customer']").val();
		var cusphone = $("[name='obj.cusphone']").val();
		var cusemail = $("[name='obj.cusemail']").val();
		var allocationnum = $("[name='obj.allocationnum']").val();
	
		$.ajax({
			url:'get_json/xfb',
			type:'get',
			/* data:{code:${param.c_code},requestnum:${param.requestnum}},	//返回客户标识，请求数量， */
			data:{company:company,comaddress:comaddress,customer:customer,cusphone:cusphone,cusemail:cusemail,allocationnum:allocationnum},
			dataType:'json',
			success:function(data){
				 console.log(JSON.stringify(data)); 
			
				alert('success');
				
				
				addFlag=false;
			}
		})
	}

</script>